<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link href="__CSS__/course.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="__JS__/common.js"></script>
</block>

<block name="body">

      <!--   <include file="Public/_hot_sell"/> -->
        <!-- 左侧菜start -->
        <div class="col-md-2">            
          <include file="Public/wsidebar"  />
        </div>
        <!-- 左侧菜end -->

  <!--内容栏start-->
  <div class="col-md-10 content">    
    <ul class="nav nav-tabs">
      <li ><a href="{:U('Wckczuoye/index')}"><i class="icon icon-home"></i>首页</a></li>
      <li class="active"><a href="{:U('Wckczuoye/add')}">我要交作业</a></li>
      <li><a href="{:U('Wckczuoye/search')}">作业检索</a></li>
      <li><a href="{:U('Wckczuoye/editCourse')}">课程管理</a></li>
      <li><a href="{:U('Wckczuoye/student')}">学生管理</a></li>
      <li><a href="{:U('Wckczuoye/myupload','id='.$vo['id'])}" >我的文档</a></li>
   </ul>
	<!-- 标题栏 -->
           <h4 style="color:#5A81A8">&nbsp;&nbsp;<i class="icon icon-pencil"></i>&nbsp;&nbsp;作业上传</h4>  
  
        <form class="form-horizontal" role="form" method='post' id="form" name="form"  enctype="multipart/form-data" action="" >
           <div class="form-group">
           <label class="col-sm-2 control-label no-padding-right" for="group">课　　程</label>
           <div class="col-sm-4"><select name="cid" id="cid" class="form-control" >
            <option value="" > 请选择相应课程</option>
            <volist name="courselist" id="vo">
            <option value="{$vo.id}" >{$vo.title}</option>            
            </volist>
             </select> 
             </div>                 
            </div>

            <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right" for="cate">类　　别</label>
               <div class="col-sm-4"><select name="cate" id="cate" class="form-control" >

                <option> 课堂作业</option>
                <volist name="catelist" id="vo">
                <option value="{$vo.id}" >{$vo.cate}</option>   
                </volist>     

                </select>               
                </div>
             </div>

            <div class="form-group">
                 <label class="col-sm-2 control-label no-padding-right" for="year">学　　年</label>           
                <div class="col-sm-4"><input type="text" class="form-control" id="year" name="year" value="{:C('CUR_YEAR')}" placeholder="学年">
                 </div>
           </div>
            <div class="space-4"></div>  
            <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="username">姓名</label> 
                 <div class="col-sm-4">
                 <select name="st_code" id="st_code" class="form-control" >
                            <volist name="studentlist" id="vo">
                            <option value="{$vo.st_code}" >{$vo.st_code}{$vo.st_name}</option>   
                            </volist> 
                   </select> 
                      <!-- <input type="text"  placeholder="请输入姓名" class="col-xs-10 col-sm-5" id="username" name="username" value="{$my.nickname}" /><span class="middle">
                      <span class="help-block col-xs-12 col-sm-7 ">如果未能正确显示姓名，请重新登录</span> -->
                      </span>
                    </div>
                  </div>
          <div class="space-4"></div>                                  
          <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right" for="title"> 作业标题</label>
            <div class="col-sm-6">
              <input type="text" placeholder="请输入文档名称" class="form-control"   id="title" name="title" value="" />
           
            <div class="col-sm-10">
              <span class="help-block">作业标题必须填写</span>
             
            </div>
             </div>
          </div>  


        <div class="clearfix"></div>
        <div class="form-group">

            <label class="col-sm-2 control-label no-padding-right" for="title"> 上传文件</label>
            <div class="col-sm-5">
              <div class="input-group">
              <input id="lefile" class="form-control" type="file" name="upfile" style="display:none"> 
               <input id="file-text" class="form-control" type="text" >
             
              <span class="input-group-btn">
                <button class="btn btn-default" type="button" onclick="$('input[id=lefile]').click();"><i class="icon icon-folder-open"> </i>    浏览文件</button>
              </span>
              </div>
             <label class="help-block">作业上传： <span class="check-tips">（请以附件形式上传电子文档）</span> </label>
            <!-- <div class="input-group">
                            
               <input id="photoCover" class="btn btn-default" type="text" style="width:300px;">
              <span class="input-group-btn ">
                <a class="btn btn-primary" onclick="$('input[id=lefile]').click();"><i class="icon icon-folder-open"> </i>    浏览文件</a>
              </span> <br/>
                
                      
            </div> -->
            </div>
           <script type="text/javascript">
            $('input[id=lefile]').change(function() {
            $('#file-text').val($(this).val());
            });
            </script>
        </div>
        <div class="form-group">
      
        <input  type="hidden" name="term" value="{:C('CUR_TERM')}" />
        </div>
      
     <div class="form-actions" style="margin-bottom:20px;height:30px;">
      <div class="col-md-offset-2 col-md-2"> 
        <button type="submit" class="btn btn-primary" id="submit-button"><span class="icon icon-ok"></span>  保存</button>
        </div>
        <div class="col-md-1">
        <button type="button" class="btn btn-danger" onclick="history.go(-1)"><span class="icon icon-remove"></span>  取消</button> 
         </div>
        </div>
      </form> 
      </div> 
      
 </div> 
</block>

